package com.example.two.mapper;


import com.example.two.domain.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserMapper {

    User getUserById(Long id);

    List<User> getAllUser();

    int insertUser(User user);

    int updateUser(User user);

    int deleteUser(Long id);

    User  getUserWithOrders(Long id);

    List<Map<String, Object>> getUserOrderCount();

    List<User> getUsersWithOrders();

    List<Map<String, Object>> countUsersByAgeGroup();

}
